package china.school.advised;

import org.aopalliance.intercept.MethodInvocation;
import org.aopalliance.intercept.MethodInterceptor;

// 自定义通知
class MyAdvice implements MethodInterceptor {
	@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		System.out.println("MyAdvice 前置处理 - 只应用于匹配的方法");
		Object result = invocation.proceed();
		System.out.println("MyAdvice 后置处理 - 只应用于匹配的方法");
		return result;
	}
}